-
Notifications
You must be signed in to change notification settings - Fork 317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace the eventsource
library
#239
Conversation
'./node_modules/event-source-polyfill/src/eventsource.min.js' | ||
) | ||
) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Diff is tricky to read, it looks like this is the only change? 👍 on removing polyfill
src/call_builder.js
Outdated
@@ -1,14 +1,13 @@ | |||
import forEach from 'lodash/forEach'; | |||
import URI from 'urijs'; | |||
import URITemplate from 'urijs/src/URITemplate'; | |||
import { NativeEventSource, EventSourcePolyfill } from 'event-source-polyfill'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK it's generally best practice to ask consumers to provide polyfills for web standards rather than pulling them in as dependencies. That would be a breaking change so I don't think we should make it willy-nilly, but at some point it might be better to rely on window.EventSource
and just provide a warning if it's missing.
The polyfill doesn't appear to work with the current codebase in the same way that the old one did. Looking into it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good but please remove all fuck
s from the code.
Only load
eventsource, which uses node built-ins
httpand
https`, in Node. Fixes an issue with Angular 6. See stellar/js-stellar-base#128.